﻿<%@ Page Title="留言管理" Language="C#" MasterPageFile="~/Masters/Account.Master" AutoEventWireup="true"
    CodeBehind="MessagesList.aspx.cs" Inherits="LEARNREN.COM.WebSite.Administrator.MessagesList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="commonContent">
        <fieldset class="changePassword">
            <legend>所有留言</legend>
            <asp:GridView ID="gvMessages" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None"
                BorderWidth="1px" CellPadding="4" CssClass="gridViewClass" OnPageIndexChanging="gvMessages_PageIndexChanging"
                PageSize="5" OnRowDeleting="gvMessages_RowDeleting" DataKeyNames="Id" EmptyDataText="没有留言信息。"
                ForeColor="Black" GridLines="Vertical">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:HyperLinkField DataNavigateUrlFields="Id" DataTextField="MsgTitle" HeaderText="标题"
                        Target="_blank" DataNavigateUrlFormatString="~/ShowFeedBack.aspx?id={0}" />
                    <asp:BoundField DataField="MsgPhone" HeaderText="电话" />
                    <asp:BoundField DataField="MsgQQ" HeaderText="QQ" />
                    <asp:BoundField DataField="MsgMail" HeaderText="邮箱" />
                    <asp:BoundField DataField="CreatedTime" DataFormatString="{0:d}" 
                        HeaderText="发布时间" />
                    <asp:CheckBoxField DataField="MsgHasRe" HeaderText="已回">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:CheckBoxField>
                    <asp:TemplateField HeaderText="回复">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnEdit" runat="server" CommandArgument='<%# Eval("Id") %>'
                                OnClick="lbtnEdit_Click">回复</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:CommandField HeaderText="删除" ShowDeleteButton="True" DeleteText=" &lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;">
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:CommandField>
                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        </fieldset>
        <fieldset class="changePassword">
            <legend>留言回复</legend>
            <p>
                <asp:Label ID="MsgTitleLabel" runat="server" AssociatedControlID="txtMsgTitle">标题:</asp:Label>
                <asp:TextBox ID="txtMsgTitle" runat="server" CssClass="textEntry" Enabled="false"></asp:TextBox>
            </p>
            <p>
                <asp:Label ID="MsgContentLable" runat="server" AssociatedControlID="txtMsgContent">内容:</asp:Label>
                <asp:TextBox ID="txtMsgContent" runat="server" CssClass="textEntry" TextMode="MultiLine"
                    Rows="6" Width="99%" Enabled="false"></asp:TextBox>
            </p>
            <p>
                <asp:Label ID="MsgReLabel" runat="server" AssociatedControlID="txtMsgRe">回复:</asp:Label>
                <asp:TextBox ID="txtMsgRe" runat="server" CssClass="textEntry" TextMode="MultiLine"
                    Rows="13" Width="99%"></asp:TextBox>
            </p>
            <p>
                <asp:RequiredFieldValidator ID="MsgReRequired" runat="server" ControlToValidate="txtMsgRe"
                    CssClass="failureNotification" ErrorMessage="必须填写“回复信息”。" ToolTip="必须填写“回复信息”。"
                    ValidationGroup="MsgValidationGroup">必须填写“回复信息”。</asp:RequiredFieldValidator>
            </p>
        </fieldset>
        <p class="submitButton">
            <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="取消" />
            <asp:Button ID="SavePushButton" runat="server" CommandName="ChangePassword" Text="保存"
                ValidationGroup="SiteConfigValidationGroup" OnClick="SavePushButton_Click" />
        </p>
    </div>
</asp:Content>
